package testcase;

import org.testng.annotations.Test;

import base.BaseDriver;
import pages.HomePage;

public class Test1 extends BaseDriver{
	//1.登录
	@Test(priority=1)
	public void test_login() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.login("18231192259","123456");
		Thread.sleep(1000);
	}
	//2.编辑个人资料--修改用户名update_username(String context)
	@Test(priority=2)
	public void test_update_username() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.update_username("小波");
		Thread.sleep(1000);
	}
	//3.更换用户名头像
	@Test(priority=3)
	public void test_update_username_picture() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.update_username_picture();
		Thread.sleep(1000);
	}
	//4.发帖
	@Test(priority=4)
	public void test_post() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.post("小狗好可爱");
		Thread.sleep(1000);
	}
	
	//5.宠物寄养
	@Test(priority=5)
	public void test_pet_foster_care() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.pet_foster_care();
		Thread.sleep(1000);
	}
	//6.添加地址
	@Test(priority=6)
	public void test_add_address() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.add_address("一号大街");
		Thread.sleep(1000);
	}
	//7.添加地址
	@Test(priority=7)
	public void test_pet_comparison() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.pet_comparison();
		Thread.sleep(1000);
	}
	//8.点赞动态( 我-点赞)(是个bug)
	@Test(priority=8)
	public void test_like_dynamic() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.like_dynamic();
		Thread.sleep(1000);
	}
	//9.删除动态 我-删除(是个bug)
	@Test(priority=9)
	public void test_delete_dynamic() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.delete_dynamic();
		Thread.sleep(1000);
	}
	//10.查看救助贴 社区-求助
	@Test(priority=10)
	public void test_view_help_post() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.view_help_post();
		Thread.sleep(1000);
	}
	//11.在宠物网查看宠物新闻 点击主页大图-查看宠物新闻
	@Test(priority=11)
	public void test_view_pet_news() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.view_pet_news();
		Thread.sleep(1000);
	}
	//12.收藏趣事 社区-五角星图标
	@Test(priority=12)
	public void test_collect_interesting_stories() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.collect_interesting_stories();
		Thread.sleep(1000);
	}
	//13.查看我的收藏 我-收藏
	@Test(priority=13)
	public void test_view_my_collection() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.view_my_collection();
		Thread.sleep(1000);
	}
	//14.发送一条带有本机直接拍摄的照片的帖子 加号-输入发帖内容-点击相机图案-点击拍一张-点击拍照-点击对号按钮-点击发布按钮
	@Test(priority=14)
	public void test_post_and_take_a_picture() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.post_and_take_a_picture("这是一只小猫");
		Thread.sleep(1000);
	}
	//15.寻找宠物 救助-我要寻找-描述，姓名，联系方式，所在位置，图片-点击帮助按钮
	@Test(priority=15)
	public void test_search_pet() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.search_pet("白色","小刘","1234567","北京");
		Thread.sleep(1000);
	}
	//16.向momo发送消息 消息-输入userId-点击发送
	@Test(priority=16)
	public void test_send_message() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.send_message("momo");
		Thread.sleep(1000);
	}
	//17.查看我的寻找 我-的寻找
	@Test(priority=17)
	public void test_view_my_search() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.view_my_search();
		Thread.sleep(1000);
	}
	//18.我要救助  救助-我要救助-描述，姓名，联系方式，所在位置，图片，需要帮助-点击帮助按钮
	@Test(priority=18)
	public void test_need_help() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.need_help("黑色","小王","123456789","上海");
		Thread.sleep(1000);
	}
	//19.登录-错误的用户名
	@Test(priority=19)
	public void test_login_wrong_username() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.login_wrong("123456789","123456");
		Thread.sleep(1000);
	}
	//20.登录-错误的密码123
	@Test(priority=20)
	public void test_login_wrong_password() throws InterruptedException {
		HomePage homePage=new HomePage(driver);
		homePage.login_wrong("18231192259","123");
		Thread.sleep(1000);
	}	
}
